package com.xnyzc.lhy.finance.service.fegin.bankcard;

import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.finance.service.fegin.bankcard.follback.FeginCheckBankCardFollBack;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 银行卡
 * @author 1
 */
@FeignClient(name = "${feign.applicationName.resource}", fallback = FeginCheckBankCardFollBack.class)
public interface FeginCheckBankCardService {

    /**
     * 验证银行卡是否存在
     * @param cardNo 银行卡号
     * @return rv
     */
    @GetMapping("check/bankCardCheck")
    Rv bankCardCheck(@RequestParam("cardNo")String cardNo);

    /**
     * 银行卡三要素鉴权
     * @param driverId 司机ID
     * @param cardNo 银行卡号
     * @param idCard 身份证号
     * @param name 姓名
     * @param tag 用户来源
     * @return Rv
     */
    @ApiOperation(value = "银行卡鉴权", notes = "银行卡鉴权")
    @GetMapping("check/bankCardAuthentication")
    Rv bankCardAuthentication(
            @RequestParam("driverId")Long driverId,
            @RequestParam("cardNo")String cardNo,
            @RequestParam("idCard")String idCard,
            @RequestParam("name")String name,
            @RequestParam("tag")String tag
    );

}
